﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Newtonsoft.Json;

namespace EzDesk.Core.Model
{
    public class FeedDataModel
    {
        public string Title { get; set; }
        public string Body { get; set; }

        public override string ToString()
        {
            return Title + Body;
        }
    }

    /// <summary>
    /// @Refactory 
    /// </summary>
    [Serializable]
    public class FeedClientModel
    {
        public Guid FeedId { get; set; }
        public long CreateOn { get; set; }
        public long UpdateOn { get; set; }
        public long LastChangeOn { get; set; }
        public string IconUrl { get; set; }

        public bool IsRead { get; set; }
        public bool IsAvailable { get; set; }
        public bool IsMark { get; set; }
        public bool IsDisplayInMainPanel { get; set; }
        public string Type { get; set; }

        public string FeedData { get; set; }
        public string PersonalData { get; set; }

        [JsonIgnore]
        public FeedDataModel OriginalData { get; set; }
        /// <summary>
        /// @Refactory this property should be replaced be an virtual property for different client type.
        /// </summary>
        public FeedDataModel TransformedData { get; set; }

        [JsonIgnore]
        public bool IsTransformed
        {
            get
            {
                return TransformedData != null;
            }
        }

    }
}
